package com.simple.crawler.constant;

public final class Const {

    public static final String DEFAULT_EXPR_PATTERN = "^.*\\{([#.\\[\\]:a-zA-Z\\(\\)0-9\\s-_]+)\\}.*$";

    public static final String EXPR_NODE_PATTERN = "^@node\\{([#.\\[\\]:a-zA-Z\\(\\)0-9\\s-_]+)\\}$";

    public static final String EXPR_TEXT_PATTERN = "^@text\\{([#.\\[\\]:a-zA-Z\\(\\)0-9\\s-_]+)\\}$";

    public static final String EXPR_ATTR_PATTERN = "^@attr\\{([#.\\[\\]:a-zA-Z\\(\\)0-9\\s-_]+)\\}:([a-zA-Z0-9-_]+)$";

    public static final String TASK_RESULT = "taskResult";

    public static final String DISPATCH_URL_SET = "dispatchUrlSet";

    public static void main(String[] args) {
        System.out.println("@node{#id li:eq(1111)}".matches(EXPR_NODE_PATTERN));
        System.out.println("@text{#id li:eq(1111)}".matches(EXPR_TEXT_PATTERN));
        System.out.println("@attr{.follow-nickName}:href".matches(EXPR_ATTR_PATTERN));
        System.out.println("@attr{.follow-nickName}:href".matches(DEFAULT_EXPR_PATTERN));
    }

}
